package cn.dao.claim.impl;

import cn.dao.claim.CheckResultDao;
import cn.entity.CheckResult;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

@Repository("checkResultDao")
public class CheckResultDaoImpl extends HibernateDaoSupport implements CheckResultDao {
    public CheckResultDaoImpl() {
    }
    @Autowired
    public CheckResultDaoImpl(@Qualifier("sessionFactory")SessionFactory sessionFactory){
        this.setSessionFactory(sessionFactory);
    }

    @Override
    public void saveOrUpdate(CheckResult checkResult) {
        getHibernateTemplate().saveOrUpdate(checkResult);
    }
}
